# $Id: PKGBUILD 183072 2013-04-17 10:21:39Z tomegun $
# Maintainer: Tom Gundersen <teg@jklm.no>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>
# Contributor: Keshav P R <(the.ridikulus.rat) (aatt) (gemmaeiil) (ddoott) (ccoomm)>
# Contributor:  Mantas Mikulėnas <grawity@gmail.com>

pkgname="gummiboot"
pkgver="30"
pkgrel="1"
pkgdesc="Simple text-mode UEFI Boot Manager"
url="http://freedesktop.org/wiki/Software/gummiboot"
arch=('x86_64' 'i686')
license=('LGPL2.1')
makedepends=('gnu-efi-libs' 'docbook-xsl')
depends=('util-linux')
conflicts=('gummiboot-efi')
provides=('gummiboot-efi')
replaces=('gummiboot-efi')
options=('!strip')
source=("ftp://ftp.archlinux.org/other/packages/${pkgname}/${pkgname}-${pkgver}.tar.xz"
        'loader.conf'
        'arch.conf')
install="gummiboot.install"

build() {
	cd "${srcdir}/${pkgname}-${pkgver}/"

	./autogen.sh
	./configure --sysconfdir=/etc --libexecdir=/usr/lib --libdir=/usr/lib
	
	make
}

package() {
	## Install gummiboot example configuration files (can go away with systemd's kernel-install)
	install -D -m0644 "${srcdir}/loader.conf" "${pkgdir}/usr/lib/gummiboot/loader/loader.conf"
	install -D -m0644 "${srcdir}/arch.conf" "${pkgdir}/usr/lib/gummiboot/loader/entries/arch.conf"

	cd "${srcdir}/${pkgname}-${pkgver}/"
	make DESTDIR="${pkgdir}" install
}
md5sums=('081bd8d90a466162fc9dae82aa065c89'
         '6ea803e5179d623716e3be0b636de658'
         '82bda9612e3a361a74cf8de2a0134b15')
